<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.entity.GoodsEvaluate"%>
<%@page import="com.entity.GoodsType"%>
<%@page import="com.util.PublicToolShowDetailTypeList"%>
<%@page import="com.util.PublicToolGetTypeDetailInfo"%>
<%@page import="com.dao.GoodsTypeDetailInfoDAO"%>
<%@page import="com.entity.GoodsType"%>
<%@page import="com.entity.GoodsTypeDetail"%>
<%@page import="com.util.PublicToolCheckParam"%>
<%@page import="com.entity.SalesGoods"%>
<%@page import="com.util.PublicToolShowGooodsTypeList"%>
<%@page import="com.entity.BulletinInfo"%>

<%@page import="com.entity.GoodsInfo"%>
<%@page import="com.util.PublicToolIndexProductShow"%>
<%@page import="com.entity.GoodsTypeDetail"%>
<%@page import="com.entity.GoodsEvaluate"%>
<%@page import="com.util.PublicToolCheckParam"%>
<%@page import="com.entity.SalesGoods"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
	String email = (String)session.getAttribute("email");
	String thirdemail = (String)session.getAttribute("thirdemail");
 %>

<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv="Content-Type">
<base href="<%=basePath%>">
<TITLE>医生坐诊列表</TITLE>
<STYLE title="defaultStyle" type="text/css">
#mainleft {
	float: left;
	width: 306px;
}
#mainright {
	float: right;
	width: 669px;
	background-color: #FFFFFF;
}
/*主页面右侧的左栏,定义间距和宽度*/
#mainright_1 {
	margin-top: 0px;
}
#mainrightleft {
	float: left;
	width: 521px;
	background-color: #FFFFFF;
}
#zmxy img {
	background-color: #FFFFFF;
	border-right-width: 5px;
	border-left-width: 5px;
	border-right-style: solid;
	border-left-style: solid;
	border-right-color: #FFFFFF;
	border-left-color: #FFFFFF;
	border-top-width: 5px;
	border-bottom-width: 5px;
	border-top-style: solid;
	border-bottom-style: solid;
	border-top-color: #FFFFFF;
	border-bottom-color: #FFFFFF;
}
#zmxy a {
	text-decoration: none;
}
</STYLE>
<LINK rel="stylesheet" type="text/css" href="images/style.css">
<STYLE type="text/css">
<!--
.STYLE1 {
	color: #A42E2E
}
-->
</STYLE>
<script type="text/javascript">
	function checkLogin(){
		if("<%=email%>" == "" || "<%=email%>" == "null"){
			alert("请先登陆!");
			return false;
		}
		else{
			top.location.href = "servlet/DoMethod?method=showMyInformation";
				return true;
		}
	}
	function checkUserLogin(){
		if("<%=email%>" == "" || "<%=email%>" == "null"){
			alert("请先登陆!");
			return false;
		}
		else{
			top.location.href = "servlet/DoChatMethod?method=login";
			return true;
		}
	}
</script>
</HEAD>
<body>
<DIV id="container_page">
  <jsp:include page="top.jsp" flush="true" />
  
  <!-- end header-->



  <DIV class="space"></DIV>
  <DIV id="container_content">
    <TABLE border="0" cellSpacing="0" cellPadding="0" width="912" align="center">
      <TBODY>
        <TR>
          <TD width="270" valign="top">  <jsp:include page="left.jsp" flush="true" />
</TD>
          <TD vAlign="top" width="645">
          
           <table border="0" cellspacing="0" cellpadding="0" width='100%' align="center">
  <tr height="60">
    <td><font size="2" color="#999999">您现在所在位置：网站首页&gt; 坐诊列表</font></td>
  </tr>
</table>
<br/>
	<table width='100%' align="center" border="0" cellpadding="0" cellspacing="0" >
		<%
			GoodsInfo moreProductInfo = null;
			//DecimalFormat df = new DecimalFormat("0.00");
			ArrayList<GoodsInfo> moreProductInfoList = (ArrayList<GoodsInfo>)request.getAttribute("moreProductInfoList");
			for(int i=0;i<moreProductInfoList.size();i++){
				moreProductInfo = moreProductInfoList.get(i);
				//String prePrice = df.format(moreProductInfo.getPrice());
	  			//String currentPrice = df.format(moreProductInfo.getDiscountPrice());
	  			String discount = String.format("%.1f", moreProductInfo.getDiscount());
				if(i%2 == 0){
					out.println("<tr height='100'>");
				}
				if(PublicToolCheckParam.checkNullAndEmpty(moreProductInfo.getPhoto())){
					out.println("<td width='78'><a href='ProductInfo?gid="+moreProductInfo.getGoodsId()+"'><img src='"+moreProductInfo.getPhoto()+"' width='70' height='70' border='0'/></a></td>");
				}
				else{
					out.println("<td width='78'><div align='center'><font color='#FF6699' size='2'>图片暂无</font></div></td>");
				}
		  		
		  		if((int)moreProductInfo.getDiscount() == 10){
		  			out.println("<td width='183'><a href='ProductInfo?gid="+moreProductInfo.getGoodsId()+"'>"+moreProductInfo.getGoodsName()+"</a><br /><font color='#FF6633'><font size='2'>￥</font></font></td>");
		  		}
		  		else{
		  		//	out.println("<td width='183'><font color='#FF3399' size='5'>"+discount+"</font>折<br /><a href='ProductInfo?gid="+moreProductInfo.getGoodsId()+"'>"+moreProductInfo.getGoodsName()+"</a><br /><font style='text-decoration: line-through' color='#999999'><font size='2'>￥</font>"+prePrice+"</font>&nbsp;&nbsp;<font color='#FF6633'><font size='2'>￥</font>"+currentPrice+"</font></td>");
		  		}
		  		if(i%2 == 1){
					out.println("</tr>");
				}
			}
		%> 	
	</table>
	<br/><br/>
	<form id="form1" name="form1" method="post" action="servlet/MoreProductInfo?typeDetailInfo=<%=moreProductInfo.getTypeDetailInfo()%>" onsubmit="return checkGo()">
	<table style="font-size: 13px;margin-left: 390px">
	<tr>
		<td>
			共有<%=request.getAttribute("sumCount")%>件坐诊
			&nbsp;&nbsp;&nbsp;
			第<%=request.getAttribute("currentPage")%>/<%=request.getAttribute("sumPageCount")%>页
			&nbsp;&nbsp;&nbsp;
			<a href="servlet/MoreProductInfo?cp=<%=request.getAttribute("indexPage")%>&typeDetailInfo=<%=moreProductInfo.getTypeDetailInfo()%>">首页</a>
			&nbsp;&nbsp;
			<a href="servlet/MoreProductInfo?cp=<%=request.getAttribute("upPage")%>&typeDetailInfo=<%=moreProductInfo.getTypeDetailInfo()%>">上一页</a>
			&nbsp;&nbsp;<a href="servlet/MoreProductInfo?cp=<%=request.getAttribute("nextPage")%>&typeDetailInfo=<%=moreProductInfo.getTypeDetailInfo()%>">下一页</a>
			&nbsp;&nbsp;
			<a href="servlet/MoreProductInfo?cp=<%=request.getAttribute("lastPage")%>&typeDetailInfo=<%=moreProductInfo.getTypeDetailInfo()%>">尾页</a>
		</td>
		<td width="40" style="padding-left: 15px">跳至第</td>
		<td><input id="go" type="text" name="cp" style="width: 35px"/></td>
		<td width="13" align="center">页</td>
		<td width="30" align="center"><input type="submit" value="go" style="width: 30px;cursor:pointer;"/></td>
	</tr>
</table>
</form>  </DIV>

  
 <jsp:include page="bottom.jsp" flush="true" /></div>
</body>
</html>
